import java.util.Scanner;

/**
 * Created by maizhipeng on 2017/5/29.
 */

public class Main {
    public static void main(String args[]){
        String regexString = "a*bb";
        Scanner input = new Scanner(System.in);
        System.out.println("regexString:"+regexString);

        Regex regex =new Regex(regexString);
        while (input.hasNextLine()) {
            String line = input.nextLine();
            if (regex.match(line)) {
                System.out.println("yes");
            } else {
                System.out.println("no");
            }
        }


    }
}
